﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Stats = BomberManServer.Gaming.Object.Stats;

namespace BomberManServer.Gaming.Object.Stats.TeamMatch
{
    class TeamGameStats : Stats.GameStats
    {
        public TeamGameStats(Match match) : base(match) { }

        public override Int16 getScore(UInt16 team_id)
        {
            return (Int16)teamStats[team_id].RoundWin;
        }

        public override UInt16 getWinnerID()
        {
            Int16 score = 0;
            UInt16 id = 0;
            for (UInt16 i = 0; i < this.teamStats.Count(); i++)
            {
                if (this.getScore(i) > score)
                {
                    score = this.getScore(i);
                    id = i;
                }
            }
            return id;
        }
    }
}
